package com.hrh.selectsystem.service;

import com.baomidou.mybatisplus.core.conditions.Wrapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.hrh.selectsystem.model.dto.file.MentorExcelImport;
import com.hrh.selectsystem.model.dto.mentor.MentorQueryRequest;
import com.hrh.selectsystem.model.dto.mentor.MentorUpdateRequest;
import com.hrh.selectsystem.model.entity.Mentor;
import com.baomidou.mybatisplus.extension.service.IService;
import com.hrh.selectsystem.model.entity.Student;
import com.hrh.selectsystem.model.vo.mentor.LoginMentorVO;
import com.hrh.selectsystem.model.vo.mentor.MentorByStudentVO;
import com.hrh.selectsystem.model.vo.mentor.MentorVO;
import com.hrh.selectsystem.model.vo.student.StudentVO;

import javax.servlet.http.HttpServletRequest;
import java.util.List;
import java.util.Map;

/**
* @author hetongxue
* @description 针对表【mentor(导师)】的数据库操作Service
* @createDate 2024-10-23 11:30:03
*/
public interface MentorService extends IService<Mentor> {

    /**
     * 登录
     *
     * @param mentorAccount
     * @param mentorPassword
     * @param request
     * @return
     */
    LoginMentorVO mentorLogin(String mentorAccount, String mentorPassword, HttpServletRequest request);

    /**
     * 注销
     * @param request
     * @return
     */
    boolean mentorLogout(HttpServletRequest request);

    /**
     * 获取当前登录用户
     * @param request
     * @return
     */
    Mentor getLoginMentor(HttpServletRequest request);

    /**
     * 提取更新请求的非空字段
     * @param mentorUpdateRequest
     * @param mentor
     * @return
     */
    Mentor notNullMentor(MentorUpdateRequest mentorUpdateRequest, Mentor mentor);

    /**
     * 获取查询条件
     * @param mentorQueryRequest
     * @return
     */
    Wrapper<Mentor> getQueryWrapper(MentorQueryRequest mentorQueryRequest);

    /**
     * 从excel批量导入导师
     * @param mentorExcelList
     */
    void importMentorsFromExcel(List<MentorExcelImport> mentorExcelList);

    /**
     * 导师信息脱敏
     * @param mentor
     * @return
     */
    MentorVO getMentorVO(Mentor mentor);

    /**
     * 有名额导师分页查询
     * @param mentorQueryRequest
     * @return
     */
    Page<Mentor> getMentorHasQuota(MentorQueryRequest mentorQueryRequest, long current, long size);
}
